package cn.stylefeng.guns.dao.impl;

import cn.stylefeng.guns.dao.entity.RuleLevel;
import cn.stylefeng.guns.dao.mapper.RuleLevelMapper;
import cn.stylefeng.guns.dao.IRuleLevelService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author quspacedraon
 * @since 2024-01-13
 */
@Service
public class RuleLevelServiceImpl extends ServiceImpl<RuleLevelMapper, RuleLevel> implements IRuleLevelService {

    @Override
    public Boolean deleteByRule(String ruleId) {
        LambdaQueryWrapper<RuleLevel> eq = Wrappers.<RuleLevel>lambdaQuery().eq(RuleLevel::getRuleId, ruleId);
        return this.remove(eq);
    }
}
